<template>
  <div class="app-container">
    <Find :OriginalFilter="{ static: true }" :formList="formList" />

    <el-card shadow="never" :body-style="{ padding: '20px' }">
      <div slot="header" class="f16">
        <span style="font-weight: 600">订单明细资料</span>
      </div>
      <Table :tableHeader="tableHeader" :tableData="tableData" :TableHeight="'250rem'"></Table>

      <!-- 分页器 -->
      <div class="bottom">
        <span class="total">共{{ total }}项数据</span>
        <el-pagination
          v-model:current-page="currentPage"
          v-model:page-size="pageSize"
          :page-sizes="[10, 20, 30, 40]"
          layout="sizes, prev, pager, next, jumper"
          :total="total"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        />
        <div>
          <el-button class="save" type="primary" size="default" @click="">保存</el-button>
          <el-button type="primary" size="default" @click="">打印</el-button>
        </div>
      </div>
    </el-card>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'CollectionNodeQuery'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
const formList = ref([
  {
    type: 'input',
    inputPlaceholder: '请输入指令',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '品牌',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      },
      {
        optionKey: '2',
        optionValue: '222222',
        optionLabel: 'option2'
      }
    ]
  },
  {
    type: 'input',
    inputPlaceholder: '请输入工厂货号',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '季度',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      },
      {
        optionKey: '2',
        optionValue: '222222',
        optionLabel: 'option2'
      }
    ]
  },
  {
    type: 'date',
    dateLabel: '客户交期',
    dateValue: ''
  },
  {
    type: 'date',
    dateLabel: '下单日期',
    dateValue: ''
  },
  {
    type: 'date',
    dateLabel: '出货日期',
    dateValue: ''
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '样品类型',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      },
      {
        optionKey: '2',
        optionValue: '222222',
        optionLabel: 'option2'
      }
    ]
  },
  {
    type: 'checkbox',
    checkboxLabel: '未审核',
    checked: false
  },
  {
    type: 'checkbox',
    checkboxLabel: '已完成',
    checked: false
  },
  {
    type: 'button',
    checkboxLabel: '清空'
  },
  {
    type: 'button',
    checkboxLabel: '导出'
  }
])

const tableHeader = ref([
  {
    label: '下单日期',
    prop: 'orderDate'
  },
  {
    label: '品牌',
    prop: 'orderDate'
  },
  {
    label: '指令号',
    prop: 'orderDate'
  },
  {
    label: '工厂货号',
    prop: 'orderDate'
  },
  {
    label: '颜色',
    prop: 'orderDate'
  },
  {
    label: '号码',
    prop: 'orderDate'
  },
  {
    label: '数量',
    prop: 'orderDate'
  },
  {
    label: '样品类型',
    prop: 'orderDate'
  },
  {
    label: '客户交期',
    prop: 'orderDate'
  },
  {
    label: '裁剪工艺检核',
    prop: 'orderDate'
  },
  {
    label: '新旧改版',
    prop: 'orderDate'
  },
  {
    label: '版房',
    prop: 'orderDate'
  },
  {
    label: '主料',
    prop: 'orderDate'
  },
  {
    label: '针辅',
    prop: 'orderDate'
  },
  {
    label: '裁断',
    prop: 'orderDate'
  },
  {
    label: '电雕',
    prop: 'orderDate'
  },
  {
    label: '无缝',
    prop: 'orderDate'
  },
  {
    label: '印刷',
    prop: 'orderDate'
  },
  {
    label: '高频',
    prop: 'orderDate'
  },
  {
    label: '配套',
    prop: 'orderDate'
  },
  {
    label: '针车',
    prop: 'orderDate'
  },
  {
    label: '大底',
    prop: 'orderDate'
  },
  {
    label: '成型投料',
    prop: 'orderDate'
  },
  {
    label: '成型完成',
    prop: 'orderDate'
  },
  {
    label: '出货',
    prop: 'orderDate'
  }
])
const tableData = [
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  },
  {
    orderDate: '123'
  }
]

// 分页器
const currentPage = ref(1)
const pageSize = ref(10)
const total = ref(658)
const handleSizeChange = (val: number) => {
  console.log(`${val} items per page`)
}
const handleCurrentChange = (val: number) => {
  console.log(`current page: ${val}`)
}
</script>

<style lang="less" scoped>
// 底部
.bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;

  .total {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    font-family: PingFangSC-Regular-, PingFangSC-Regular;
  }

  :deep(.el-input__wrapper) {
    padding: 0;
  }

  :deep(.el-input__suffix) {
    transform: translateX(-9px);
  }

  :deep(.el-pagination .el-select .el-input) {
    width: 88px;
  }

  :deep(.number) {
    border: 1px solid #dcdcdc;
    margin-right: 8px;
    border-radius: 3px 3px 3px 3px;
  }

  :deep(.is-active.number) {
    background-color: #f89027 !important;
    color: white;
    border-radius: 3px 3px 3px 3px;
  }

  .save {
    color: black;
    border: 1px solid #e7e7e7;
    background: #e7e7e7;
  }
}
</style>
